/*
 *
 * Copyright(c) 2010 Safelayer Secure Communications
 *
 * This is open source software, placed under the terms of the
 * GNU GENERAL PUBLIC LICENSE Version 3.
 * Please see: http://www.gnu.org/licenses/gpl-3.0.txt
 * 
 * Permission to use, copy, modify, and distribute this software
 * for any purpose and without fee is hereby granted, provided
 * that the above copyright notices appear in all copies and that
 * both the copyright notice and this permission notice appear in
 * supporting documentation.
 * 
 */
package com.neuralnoise.foaf.core;

import com.hp.hpl.jena.rdf.model.Resource;

/**
 * This abstract class is the superclass of all classes representing a <code>Rule</code> which
 * decides whether two FOAF person resources are meaningfully equivalent.
 * 
 * @author victor.martinez <swtp@safelayer.com>
 * 
 */
public abstract class Rule {

	private String name;

	public Rule(String name) {
		this.name = name;
	}

	/**
	 * Indicates whether two FOAF person resources are meaningfully equivalent.
	 * 
	 * @param resource1 the resource to compare.
	 * @param resource2 the resource to compare.
	 * @return <code>true</code> if the resources are equals <tt>false</tt> otherwise.
	 */
	public abstract boolean equals(Resource resource1, Resource resource2);

	/**
	 * Answer <code>true</code> if the result of the method {@link #equals(Resource, Resource)} is
	 * highly reliable or otherwise should be considered as a suggested result.
	 * 
	 * @return <code>true</code> if the result of the method {@link #equals(Resource, Resource)} is
	 *         highly reliable or otherwise return <code>false</code>
	 */
	public abstract boolean isTrustEquals();
	
	public String getName() {
		return name;
	}
}
